<?php

require_once __DIR__.'/../vendor/.composer/autoload.php';

use Silex\Application;
use Silex\Provider\TwigServiceProvider;
use Silex\Provider\UrlGeneratorServiceProvider;
use Knp\Menu\Silex\KnpMenuServiceProvider;

$app = new Application();
$app['autoloader']->registerNamespace('Knp\Menu', __DIR__.'/../vendor/KnpMenu/src');

require_once __DIR__.'/config.php';


$app->register(new UrlGeneratorServiceProvider());

$app->register(new Silex\Provider\TwigServiceProvider(), array(
    'twig.path' => __DIR__.'/../views',
));

$app->register(new KnpMenuServiceProvider());

return $app;
